package com.example.file;

import com.example.file.compress.CompressUtil;
import org.springframework.format.datetime.DateFormatter;

import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

/**
 * @author: dangwen
 * @createDate: 2021/7/7
 */
public class Test {
    public static void main(String[] args) throws IOException, ParseException {
//        CompressUtil.compress("C:\\Users\\hp\\Desktop\\ok", "C:\\Users\\hp\\Desktop\\test.tar.gz");
//        CompressUtil.unTarGz("C:\\Users\\hp\\Desktop\\test.tar.gz", "C:\\Users\\hp\\Desktop\\
        String time = "Mon, 17 Apr 2023 15:30:42 GMT";
        String strDate = "Mon, 14 Mar 2022 17:23:26 GMT";
        SimpleDateFormat sdf = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss 'GMT'", Locale.US);
        Date date1 = sdf.parse(time);
        sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println(sdf.format(date1));

    }
}
